# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=ortp
pkgver=5.1.45
pkgrel=0
pkgdesc="oRTP is a library implemeting Real-time Transport Protocol (RFC3550), licensed under LGPL"
url="http://www.linphone.org/technical-corner/ortp"
arch="all"
options="!check" #no test avail
license="LGPL-2.0-or-later VSL"
makedepends="cmake bctoolbox-dev samurai"
subpackages="$pkgname-doc $pkgname-dev"
source="https://gitlab.linphone.org/BC/public/ortp/-/archive/$pkgver/ortp-$pkgver.tar.gz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_MODULE_PATH=/usr/lib/cmake \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_SKIP_INSTALL_RPATH=ON \
		-DENABLE_STATIC=NO \
		-DENABLE_SHARED=YES .
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
912f528530f85dbd33baae74da434f909e482265d0a58760eb8fbb365be05c6c9d1bda1ed532e57ecb7e63813db57fea8e199cad2bfe2968b212baf570fc8992  ortp-5.1.45.tar.gz
"
